import 'package:ls_work/net/response/response_data.dart';

class MealRecordList  extends BaseListData{
  MealRecordBean? bean;
  CaptionBean? caption;

  MealRecordList({this.bean, this.caption});

  MealRecordList.fromJson(Map<String, dynamic> json) {    
    this.bean = json['bean'] != null ? MealRecordBean.fromJson(json['bean']) : null;
    this.caption = json['caption'] != null ? CaptionBean.fromJson(json['caption']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.bean != null) {
      data['bean'] = this.bean?.toJson();
    }
    if (this.caption != null) {
      data['caption'] = this.caption?.toJson();
    }
    return data;
  }

}

class MealRecordBean {
  String? elderName;
  String? roomNo;
  String? nurseLevelName;
  String? edibleDateDesc;
  String? dietaryDesc;
  String? edibleDate;
  String? accCode;
  String? createdBy;
  String? createdDate;
  String? updatedBy;
  String? updatedDate;
  double? money;
  int? age;
  int? roomId;
  int? nurseLevelId;
  int? customerId;
  int? flag;
  int? timeRange;
  int? branchId;
  int? tenantId;
  int? saasId;
  int? id;
  List<DetailsListBean>? details;

  MealRecordBean({this.elderName, this.roomNo, this.nurseLevelName, this.edibleDateDesc, this.dietaryDesc, this.edibleDate, this.accCode, this.createdBy, this.createdDate, this.updatedBy, this.updatedDate, this.money, this.age, this.roomId, this.nurseLevelId, this.customerId, this.flag, this.timeRange, this.branchId, this.tenantId, this.saasId, this.id, this.details});

  MealRecordBean.fromJson(Map<String, dynamic> json) {
    this.elderName = json['elderName'];
    this.roomNo = json['roomNo'];
    this.nurseLevelName = json['nurseLevelName'];
    this.edibleDateDesc = json['edibleDateDesc'];
    this.dietaryDesc = json['dietaryDesc'];
    this.edibleDate = json['edibleDate'];
    this.accCode = json['accCode'];
    this.createdBy = json['createdBy'];
    this.createdDate = json['createdDate'];
    this.updatedBy = json['updatedBy'];
    this.updatedDate = json['updatedDate'];
    this.money = json['money'];
    this.age = json['age'];
    this.roomId = json['roomId'];
    this.nurseLevelId = json['nurseLevelId'];
    this.customerId = json['customerId'];
    this.flag = json['flag'];
    this.timeRange = json['timeRange'];
    this.branchId = json['branchId'];
    this.tenantId = json['tenantId'];
    this.saasId = json['saasId'];
    this.id = json['id'];
    this.details = (json['details'])!=null?(json['details'] as List).map((i) => DetailsListBean.fromJson(i)).toList():null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['elderName'] = this.elderName;
    data['roomNo'] = this.roomNo;
    data['nurseLevelName'] = this.nurseLevelName;
    data['edibleDateDesc'] = this.edibleDateDesc;
    data['dietaryDesc'] = this.dietaryDesc;
    data['edibleDate'] = this.edibleDate;
    data['accCode'] = this.accCode;
    data['createdBy'] = this.createdBy;
    data['createdDate'] = this.createdDate;
    data['updatedBy'] = this.updatedBy;
    data['updatedDate'] = this.updatedDate;
    data['money'] = this.money;
    data['age'] = this.age;
    data['roomId'] = this.roomId;
    data['nurseLevelId'] = this.nurseLevelId;
    data['customerId'] = this.customerId;
    data['flag'] = this.flag;
    data['timeRange'] = this.timeRange;
    data['branchId'] = this.branchId;
    data['tenantId'] = this.tenantId;
    data['saasId'] = this.saasId;
    data['id'] = this.id;
    data['details'] = this.details != null?this.details?.map((i) => i.toJson()).toList():null;
    return data;
  }
}

class CaptionBean {
  String? flag;
  String? updatedBy;
  String? createdBy;
  String? customerId;
  String? timeRange;

  CaptionBean({this.flag, this.updatedBy, this.createdBy, this.customerId, this.timeRange});

  CaptionBean.fromJson(Map<String, dynamic> json) {    
    this.flag = json['flag'];
    this.updatedBy = json['updatedBy'];
    this.createdBy = json['createdBy'];
    this.customerId = json['customerId'];
    this.timeRange = json['timeRange'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['flag'] = this.flag;
    data['updatedBy'] = this.updatedBy;
    data['createdBy'] = this.createdBy;
    data['customerId'] = this.customerId;
    data['timeRange'] = this.timeRange;
    return data;
  }
}

class DetailsListBean {
  String? customerId;
  String? edibleDate;
  String? menuName;
  String? floorId;
  String? floorNo;
  String? createdBy;
  String? createdDate;
  String? updatedBy;
  String? updatedDate;
  double? money;
  int? orderId;
  int? menuId;
  int? menuType;
  int? count;
  int? branchId;
  int? tenantId;
  int? saasId;
  int? id;

  DetailsListBean({this.customerId, this.edibleDate, this.menuName, this.floorId, this.floorNo, this.createdBy, this.createdDate, this.updatedBy, this.updatedDate, this.money, this.orderId, this.menuId, this.menuType, this.count, this.branchId, this.tenantId, this.saasId, this.id});

  DetailsListBean.fromJson(Map<String, dynamic> json) {    
    this.customerId = json['customerId'];
    this.edibleDate = json['edibleDate'];
    this.menuName = json['menuName'];
    this.floorId = json['floorId'];
    this.floorNo = json['floorNo'];
    this.createdBy = json['createdBy'];
    this.createdDate = json['createdDate'];
    this.updatedBy = json['updatedBy'];
    this.updatedDate = json['updatedDate'];
    this.money = json['money'];
    this.orderId = json['orderId'];
    this.menuId = json['menuId'];
    this.menuType = json['menuType'];
    this.count = json['count'];
    this.branchId = json['branchId'];
    this.tenantId = json['tenantId'];
    this.saasId = json['saasId'];
    this.id = json['id'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['customerId'] = this.customerId;
    data['edibleDate'] = this.edibleDate;
    data['menuName'] = this.menuName;
    data['floorId'] = this.floorId;
    data['floorNo'] = this.floorNo;
    data['createdBy'] = this.createdBy;
    data['createdDate'] = this.createdDate;
    data['updatedBy'] = this.updatedBy;
    data['updatedDate'] = this.updatedDate;
    data['money'] = this.money;
    data['orderId'] = this.orderId;
    data['menuId'] = this.menuId;
    data['menuType'] = this.menuType;
    data['count'] = this.count;
    data['branchId'] = this.branchId;
    data['tenantId'] = this.tenantId;
    data['saasId'] = this.saasId;
    data['id'] = this.id;
    return data;
  }
}
